parser grammar TxtParser;

options {
  language = Java;
  tokenVocab = TxtLexer;
  output = AST;
}
tokens {
  ROW;
  COLUMN;
  BOARD;
}
@header {
package org.moflon.moca.txt.parser; 
}


main: (SEPERATOR  r+=row)* SEPERATOR  -> ^(BOARD $r*);
row: (c+=column)+ -> ^(ROW $c*);
column: (COLSEP f=FIGURE) -> ^(COLUMN $f) | COLSEP -> COLUMN;

